import request from '@/utils/request';

export async function getOptionListPreviewCPB() {
  return request(`/fss/ErveryProfit/OptionListPreviewCPB`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function addCPB(params) {
  return request(`/fss/ErveryProfit/UploadCpbTrade`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

export async function makeOptionListCPB() {
  return request(`/fss/ErveryProfit/makeOptionListCPB`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}
export async function getOptionListCPB() {
  return request(`/fss/ErveryProfit/OptionListCPB`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getOptionListPreviewUBS() {
  return request(`/fss/ErveryProfit/OptionListPreviewUBS`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function makeOptionListUBS() {
  return request(`/fss/ErveryProfit/makeOptionListUBS`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getOptionListUBS() {
  return request(`/fss/ErveryProfit/OptionListUBS`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getUBSAccountInfo() {
  return request(`/fss/AccountProfitUBS/UBSAccountInfo`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getStockProfit(param) {
  return request(`/fss/ErveryProfit/StockProfit?bank=${param}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getGeneratePosition(param) {
  return request(`/fss/ErveryProfit/StockGeneratePosition?bank=${param}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getStockUbsOperateList() {
  return request(`/fss/ErveryProfit/StockUbsOperateList`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getStockCpbOperateList() {
  return request(`/fss/ErveryProfit/StockCpbOperateList`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function delStockOperate() {
  return request(`/fss/ErveryProfit/StockDelOperate`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function uploadStockOperate(params) {
  return request(`/fss/ErveryProfit/UploadStockOperate`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

export async function getProfitPandect(param) {
  return request(`/fss/ErveryProfit/GetProfitPandect?date=`+ param, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

export async function getUbsBankCrawlDetail(param) {
  return request(`/fss/BankInfo/UbsBankCrawlDetail`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
  });
}

